//
//  TopicButtonTableViewCell.swift
//  HoneyBee
//
//  Created by Smith_Yang on 2018/5/30.
//  Copyright © 2018 point. All rights reserved.
//

import UIKit

class TopicButtonTableViewCell: UITableViewCell {
    
    typealias kButtonTap = (_ model :TopicDetailModel) ->()
    var buttonTapBlock: kButtonTap!
    var model : TopicDetailModel?

    @IBOutlet weak var shangButton: UIButton!
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
        selectionStyle = .none
        clipsToBounds = true
        shangButton.layer.cornerRadius = shangButton.frame.size.height/2.0
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
    @IBAction func ShangButtonAction(_ sender: Any) {
        
        if buttonTapBlock != nil && model != nil {
            buttonTapBlock(model!)
        }
    }
    
    public func configModel(_model:TopicDetailModel) {
        
        model = _model
        
    }

    
}
